export default {
	namespaced: true,
	state: {
		userInfo: uni.getStorageSync('userInfo') || {},
		stashInfo: uni.getStorageSync('stashInfo') || {}
	},
	mutations: {
		SET_USER_INFO(state, userInfo) {
			state.userInfo = userInfo
			uni.setStorageSync('userInfo', userInfo)
		},
		REMOVE_USER_INFO(state) {
			state.userInfo = ''
			state.stashInfo = ''
			uni.removeStorageSync('userInfo')
			uni.removeStorageSync('stashInfo')
		},
		SET_STASH_INFO(state, stashInfo) {
			state.stashInfo = stashInfo
			uni.setStorageSync('stashInfo', stashInfo);
		}
	},
	actions: {
		// login({
		// 	commit
		// }, userInfo) {
		// 	return commit('SET_USER_INFO', userInfo)
		// },
	}
}